package com.rainbow.redis.plus.core.starter;

import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import com.rainbow.redis.plus.core.aop.RedisAspect;
import com.rainbow.redis.plus.core.constant.RedisConstant;

@EnableAspectJAutoProxy
@Configuration
@AutoConfigureAfter({MonitorConfigAutoConfiguration.class})
@ConditionalOnProperty(name = RedisConstant.REDIS_MINOTOR_ENABLED,havingValue = "true")
public class AspectAutoConfiguration {

	@Bean
	public RedisAspect redisAspect() {
		return new RedisAspect();
	}
}
